<template>
  <div class="my-basq">
    <van-tabs color="#2CBE9C" swipeable v-model:active="active">
      <van-tab title="未完成">
        <van-search
          v-model="value"
          shape="round"
          background="#fbfbfb"
          placeholder="请输入搜索关键词"
          class="search-form"
        />
      </van-tab>
      <van-tab title="已完成">
        <van-search
          v-model="value"
          shape="round"
          background="#fbfbfb"
          placeholder="请输入搜索关键词"
          class="search-form"
        />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import { useRouter } from "vue-router";
import {
  Button as VanButton,
  Tab as VanTab,
  Tabs as VanTabs,
  Search as VanSearch,
  Rate as VanRate,
  Overlay as VanOverlay,
} from "vant";
import { getUserSceneCaseList } from "@/model/user";
export default defineComponent({
  name: "MyBzsq",
  components: {
    VanTab,
    VanTabs,
    VanSearch,
    VanButton,
    VanRate,
    VanOverlay,
  },
  setup() {
    const router = useRouter();
    const active = ref(0);
    const value = ref("");
    const starValue = ref(1);
    const show = ref(false);
    const openWin = (name: any) => {
      router.push({
        name: name,
      });
    };
    const query = ref({
      applicantName: "李增",
      applicantCardNumber: "340221199209220437",
      isFinish: "Y",
    });
    const getUserSceneCaseData = async (data: any) => {
      const res = await getUserSceneCaseList(data);
      console.log(res);
    };
    getUserSceneCaseData(query.value);
    return {
      openWin,
      active,
      value,
      starValue,
      show,
    };
  },
});
</script>

<style scoped lang="scss">
@import "~@/assets/scss/pub.scss";
.van-tab--active {
  font-size: pxToVw(30);
}
.search-form {
  padding: pxToVw(20) pxToVw(20);
}
::v-deep(.van-tab--active) {
  font-size: pxToVw(35);
}
</style>
